Skip to content

Conversation

@gpanders
Copy link
Member

@gpanders gpanders commented Jul 1, 2025

Fixes CC-5611.

This is a relic from an earlier time. The only command for which this is useful is the "cloudchamber curl" subcommand, in which case it should just be the default and non-configurable anyway.

It might make sense in the future to have a --json flag for commands like containers images list, but if we do add that it should be well-scoped and have proper user requirements, rather than spreading over all of the cloudchamber/containers commands. But for now the output of this command is well-formatted and is easy to parse (same as docker images). We will keep it for images list too. It's trivial to support.


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: minor change CLI (removing non-public option)
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: experimental commands

@gpanders gpanders requested review from a team as code owners July 1, 2025 20:04
@changeset-bot
Copy link

changeset-bot bot commented Jul 1, 2025

🦋 Changeset detected

Latest commit: 8b87750

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
wrangler Patch
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Jul 1, 2025
@gpanders gpanders force-pushed the push-pvxzxmsqszsk branch from e5974dd to c969f94 Compare July 1, 2025 20:05
@gpanders gpanders added the e2e Run wrangler + vite-plugin e2e tests on a PR label Jul 1, 2025
@gpanders gpanders force-pushed the push-pvxzxmsqszsk branch from c969f94 to 4c9802d Compare July 1, 2025 20:05
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jul 1, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@9815

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@9815

miniflare

npm i https://pkg.pr.new/miniflare@9815

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@9815

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@9815

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@9815

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@9815

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@9815

wrangler

npm i https://pkg.pr.new/wrangler@9815

commit: 8b87750

@gpanders gpanders force-pushed the push-pvxzxmsqszsk branch 4 times, most recently from 420c555 to c8a81b9 Compare July 1, 2025 21:03
@gpanders gpanders force-pushed the push-pvxzxmsqszsk branch from c8a81b9 to 9ab0f22 Compare July 2, 2025 14:18
This is a relic from an earlier time. The only command for which this is
useful is the "cloudchamber curl" subcommand, in which case it should
just be the default and non-configurable anyway.
@gpanders gpanders force-pushed the push-pvxzxmsqszsk branch from 9ab0f22 to 918d683 Compare July 2, 2025 14:41
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you unmock the print banner function (vi.unmock("../wrangler-banner");) and add a test to see the banner doesn't print with --json? (historically, the --json flag has been really easy to accidentally break 🥲 )

probably to curl as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok done in c87a86e, let me know if I did it wrong.

"wrangler": patch
---

Remove --json flag from containers and cloudchamber commands
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you note that image and curl still have --json

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated again to remove reference to curl, since curl doesn't have --json (only images list does).

json: boolean;
env?: string;
imageUpdateRequired?: boolean;
skipPrompts?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be configured anywhere and if not, is it necessary? looks like its hardcoded to true in one place

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's necessary to maintain current behavior with how wrangler deploy works, which is always non-interactive.

wrangler cloudchamber apply determines interactivity based on a connected TTY, but wrangler deploy always skips prompts (this is current behavior).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah i see now - could you add a comment to skipPrompts to explain this is for deploy?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed in chat. We'll instead change apply to always be non-interactive, so we don't need skipPrompts after all. 0cf6456

};
}

export async function loadAccountSpinner({ json }: { json?: boolean }) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't we need this anymore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only places it was used were not needed -- after removing those call sites there were none left, so I removed the function completely.

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Jul 2, 2025
This matches the behavior of "wrangler deploy" which is also always
non-interactive.
@gpanders
Copy link
Member Author

gpanders commented Jul 2, 2025

I will merge this PR before #9813 and #9811 to make resolving conflicts slightly easier.

@gpanders gpanders force-pushed the push-pvxzxmsqszsk branch from 72468ea to 8b87750 Compare July 2, 2025 16:09
@gpanders gpanders added this pull request to the merge queue Jul 2, 2025
@gpanders gpanders removed this pull request from the merge queue due to a manual request Jul 2, 2025
@gpanders gpanders added this pull request to the merge queue Jul 2, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 2, 2025
@gpanders gpanders added this pull request to the merge queue Jul 2, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 2, 2025
@gpanders gpanders added this pull request to the merge queue Jul 2, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 2, 2025
@emily-shen emily-shen added this pull request to the merge queue Jul 3, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jul 3, 2025
* Remove --json arg from cloudchamber and containers commands

This is a relic from an earlier time. The only command for which this is
useful is the "cloudchamber curl" subcommand, in which case it should
just be the default and non-configurable anyway.

* Update changeset entry to include omissions for "curl" and "images list"

* Unmock banner to ensure it doesn't print when using --json flag

* Make "cloudchamber apply" always non-interactive

This matches the behavior of "wrangler deploy" which is also always
non-interactive.

* Fix lint errors

* Remove note from changelog about --json with curl command

cloudchamber curl _doesn't_ have a --json flag anymore.

* Rename cloudchamber curl -D option to -d to match real curl

-D is supported as a hidden/deprecated alias
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 3, 2025
@emily-shen emily-shen added this pull request to the merge queue Jul 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 3, 2025
@emily-shen emily-shen added this pull request to the merge queue Jul 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 3, 2025
@emily-shen emily-shen added this pull request to the merge queue Jul 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 3, 2025
@emily-shen emily-shen added this pull request to the merge queue Jul 3, 2025
Merged via the queue into cloudflare:main with commit 1358034 Jul 3, 2025
69 of 77 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Jul 3, 2025
@workers-devprod workers-devprod mentioned this pull request Jul 3, 2025
@gpanders gpanders deleted the push-pvxzxmsqszsk branch July 3, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Run wrangler + vite-plugin e2e tests on a PR

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants